file1 = 'E:/cfiles/utf8编码.txt'
file2 = 'E:/cfiles/gbk编码.txt'
with open(file1,encoding='utf8')as f1,open(file2,encoding='gbk')as f2:
    fileread1 = f1.read()
    fileread2 = f2.read()
    newfile = fileread1+fileread2
    print(newfile)
newcontent = input('请输入新文件的名称:')

with open(newcontent,'w',encoding='utf8') as f:
    f.write(newfile)

